package org.shop.controller.app;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.shop.entity.School;
import org.shop.service.SchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SchoolController {
	@Autowired
    private SchoolService schoolService;
	/**
	 * 获取所有学校 
	 * @param req
	 * @return
	 */
	@RequestMapping("app/getSchoolList")
	@ResponseBody
	public List<School> getSchoolist(HttpServletRequest req){
		List<School> list = schoolService.getSchoolList();
		return list;
	}
	
}
